function getAJAX(){var xmlhttp;if(window.XMLHttpRequest){xmlhttp=new XMLHttpRequest();}else{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}return xmlhttp;}
var xmlhttp=getAJAX();
function AJAX(method,url,data,func){//AJAX的调用函数 
if(!xmlhttp)return;xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4 && xmlhttp.status==200){func(xmlhttp.responseText);}};xmlhttp.open(method,url,true);
if(method.toLowerCase()=='post'&& data){xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); }xmlhttp.send(data);setTimeout("CheckRequest()",30000);}
function CheckRequest(){if(xmlhttp.readyState!=4) xmlhttp.abort(); } 
function $(a){return document.getElementById(a);} //获取
function $$(a){return document.createElement(a);} //添加
function hide(a){if($(a))$(a).style.display='none';} 
function $$$(a){a.parentNode.removeChild(a);} //删除
function show(a){if($(a))$(a).style.display='';}
function hideURLbar(){setTimeout("window.scrollTo(0, 1);", 100);} //延迟隐藏地址栏
function write(a){document.write(a);} //写入
